class ListNode {
    val: number
    next: ListNode | null
    constructor(val?: number, next?: ListNode | null) {
        this.val = (val===undefined ? 0 : val)
        this.next = (next===undefined ? null : next)
    }
}

/**
 * https://leetcode-cn.com/problems/delete-node-in-a-linked-list/submissions/
 * 删除链表中的节点
 * @param root 
 */
const deleteNode = (root: ListNode | null): void => {
    // 判断节点
    if (root === null) return;
    root.val = root.next!.val!;
    root.next = root.next!.next;
};

export {}